#!/bin/bash

if [ $# -ne 3 ]
then
	echo "Error:"
	echo "	usage : $0 <base_dir> <port number> <manager_config>"
	exit 1
fi

# check that the interval >0
if [ $2 -le 0 ]
then
	echo "Invalid port number"
	exit 1
fi

BASE_DIR=$1
PORT=$2
MANAGER_CONF_DIR=$3

cd $BASE_DIR/manager/obj
rm -f *.dir *.pag DIR_ID_FILE FILE_ID_FILE 
./manager $PORT $MANAGER_CONF_DIR
